
<?php

if(isset($_GET['role']) && ($_GET['role']=='incubatee' || $_GET['role']=='mentor')){
include 'header.php';

?>
<style type="text/css">
label.error, textarea.error, input.error {
    color:#FF0000;
}
label.valid{
    color:#00CC00;
}
</style>
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
  <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
  
  <script>
  
  // When the browser is ready...
  $(function() {
  
    // Setup form validation on the #register-form element
    $("#signUpForm").validate({
    
        // Specify the validation rules
        rules: {
            firstname: "required",
            lastname: "required",
            email: {
                required: true,
                email: true
            },
            pass: {
                required: true,
                minlength: 6
            },
            confPass:{
				equalTo:".password",
                },
            agree: "required"
        },
        
       
        
        submitHandler: function(form) {
            form.submit();
        }
    });

  });
  
  </script>

</head>


<body>
			<div class="span3">
		<h2>Registration</h2>
		<p class="alert alert-info">TechWorks for You and Your Ideas tool
			requires a registered account in order to create and save changes to
			your business plan. In addition, this tool is integrated with the
			TechDera Community. This integration enables you to post business
			plan questions to the Community discussion forums. Please fill out
			the fields below to register your account for the Business Plan Tool
			and the TechDera Community.</p>
	</div>

	<div class="span8">
	
									<?php
									if (isset ( $_SESSION ['ERRMSG_ARR'] ) && is_array ( $_SESSION ['ERRMSG_ARR'] ) && count ( $_SESSION ['ERRMSG_ARR'] ) > 0) {
										echo "<div class='alert alert-error'>";
										foreach ( $_SESSION ['ERRMSG_ARR'] as $msg ) {
											echo '<span>', $msg, '</span><br/>';
										}
										echo '</div>';
										unset ( $_SESSION ['ERRMSG_ARR'] );
									}
									?>
		<h2>&nbsp;</h2>

		<form id="signUpForm" class="form-horizontal" action='execute/member_reg.php'
			method="post" id="regvalid" data-validate="parsley">
			<fieldset>
				<div class="control-group">
					<!-- E-mail -->
					<label class="control-label" for="email">First Name</label>
					<div class="controls">
						<input type="text" id="firstname" name="firstname"
							placeholder="Your First Name" class="input-xlarge">

					</div>
				</div>
				<div class="control-group">
					<!-- E-mail -->
					<label class="control-label" for="email">Last Name</label>
					<div class="controls">
						<input type="text" id="lastname" name="lastname"
							placeholder="Your Last Name" class="input-xlarge">

					</div>
				</div>
				<div class="control-group">
					<!-- E-mail -->
					<label class="control-label" for="email">Email</label>
					<div class="controls">
						<input type="text" id="email" name="email"
							placeholder="Your Valid Email Address" class="input-xlarge"
							rel="popover"
							data-content="A valid email address. All emails from the system will be sent to this address. This email address will not be made public unless you choose to make it so below; otherwise, it will only be used if you wish to receive a new password or wish to receive certain news or notifications by email."
							data-original-title="Email Address" data-required="true">

					</div>
				</div>

				<div class="control-group">
					<!-- Password-->
					<label class="control-label" for="password">Password</label>
					<div class="controls">
						<input type="password" class="password" name="pass"
							placeholder="Your Password" class="input-xlarge" rel="popover"
							data-content="Password can contain number, characters, signs"
							data-original-title="Your Password" data-required="true">

					</div>
				</div>

				<div class="control-group">
					<!-- Password -->
					<label class="control-label" for="password_confirm">Password
						(Confirm)</label>
					<div class="controls">
						<input type="password" id="confPass" name="confPass"
							placeholder="Retype-Password" class="input-xlarge" rel="popover"
							data-content="Provide a password for the new account in both fields. Password must be at least high strength."
							data-original-title="Confirm Password" data-required="true">
						
					</div>
				</div>
				<input type="hidden" name="role" value="<?php echo $_GET['role']; ?>">

				<div class="control-group">
					<!-- Button -->
					<div class="controls">
						<button class="btn btn-warning input-xlarge">
							<i class="icon-plus"></i>&nbsp;Register
						</button>
					</div>
				</div>
			</fieldset>
		</form>


	</div>

		<?php
		include 'footer.php';
}
else{
	header("Location:index.php");
}
		?>
